package ylsb.dao;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;
import ylsb.model.Shiji;
import ylsb.model.ShijiExample;
import ylsb.model.Shijipinzhong;

public interface ShijiMapper {
    List<Map<String, Object>> findPinzhongAll(@Param("xiangmuid") String ppxiangmuId);

    List<Map<String, Object>> findGuochanBypinzhong(@Param("xiangmuid") String ppxiangmuId,@Param("pinzhongxuhao")String ppPinzhong);

    List<Map<String, Object>> findGuochanPinzhong(@Param("xiangmuid") String ppxiangmuId);

    List<Map<String, Object>> findFengbi(@Param("xiangmuid") String ppxiangmuId);

    List<Map<String, Object>> findFengbiCount(@Param("xiangmuid") String ppxiangmuId,@Param("pinzhongxuhao")String ppPinzhong);

    List<Map<String, Object>> findResultBypinzhong(@Param("xiangmuid") String ppxiangmuId,@Param("userid")String ppuserId,@Param("pinzhongxuhao")String ppPinzhong);

    List<Map<String, Object>> findResultGuochanBypinzhong(@Param("xiangmuid") String ppxiangmuId,@Param("userid")String ppuserId,@Param("pinzhongxuhao")String ppPinzhong);

    Object getPinguiCount(@Param("xiangmuid") String mmxiangmuId);

    Object getPinzhongCount(@Param("xiangmuid") String mmxiangmuId);

    Object getPaichuPinguiCount(@Param("xiangmuid") String mmxiangmuId);

    List<Map<String, Object>> getCountByPinzhongAndPinpai(@Param("pinzhongxuhao") int mmpinzhong,
                                                              @Param("pinpai") String mmpinpai,
                                                              @Param("xiangmuid") String mmxiangmuId);

    List<Map<String, Object>> findXinghaoByPinpai(@Param("xiangmuid") String ppxiangmuId,@Param("pinzhongxuhao")String ppPinzhongOne,@Param("pinpai")String ppPinpaiOne);

    List<Map<String, Object>> findAllByXiangmuIdAndTiaojian(@Param("xiangmuid") String ppxiangmuId,@Param("leibie")String ppleibie,@Param("pinpaiqingkuang")String pppinpaiqingkuang);

    int countByExample(ShijiExample example);

    int deleteByExample(ShijiExample example);

    int deleteByPrimaryKey(String id);

    int insert(Shiji record);

    int insertSelective(Shiji record);

    List<Shiji> selectByExample(ShijiExample example);

    Shiji selectByPrimaryKey(String id);

    int updateByExampleSelective(@Param("record") Shiji record, @Param("example") ShijiExample example);

    int updateByExample(@Param("record") Shiji record, @Param("example") ShijiExample example);

    int updateByPrimaryKeySelective(Shiji record);

    int updateByPrimaryKey(Shiji record);

    List<Shijipinzhong> selectAllByXiangmuid(@Param("xiangmuid") String xiangmuid, @Param("startindex") int startIndex,
                                             @Param("pagesize") int pageSize);

    List<Shijipinzhong> selectBiaojueByXiangmuid(@Param("xiangmuid") String xiangmuid, @Param("userid") String userid,
                                                 @Param("leibie") String mmleibie,
                                                 @Param("pinpaiqingkuang") String mmpinpaiqingkuang,
                                                 @Param("startindex") int startIndex, @Param("pagesize") int pageSize);

    Object getShijilist(@Param("xiangmuid") String ppxiangmuId,
                        @Param("leibie") String mmleibie,
                        @Param("pinpaiqingkuang") String mmpinpaiqingkuang,
                        @Param("startindex") int ppStartIndex, @Param("pagesize") int ppPageSize);
}